package com.ynny.Controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.ynny.Monitor.HotspotBlockHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HotspotController {
    @GetMapping("/hotspot")
    @SentinelResource(value = "getHotspotBlockHandler",
            blockHandler = "getHotspotBlockHandler",
            blockHandlerClass = HotspotBlockHandler.class)
    public String getHotspot(@RequestParam(value = "type", required = false) String type,
                             @RequestParam(value = "size", required = false) String size){
        return "进入热点";
    }
}